<template>
    <div class="about">
        <div class="site-content">
            <div class="content-warp">
                <div class="about-site about-info">
                    <section-title><span>❤</span>关于我们</section-title>
                    <div class="info-card">
                        <p>北辞一个正朝着梦想前进的男孩🚹</p>
                        <p>一直在不断的增强实力做出进步的个人博客📚</p>
                        <p>做了数据的修改后端的响应模板基无改动</p>
                        <p>本博客采用的Vue模板为GitEE上的gblog：<a target="_blank" href="https://gitee.com/fengziy/Gblog" style="color: #ff6d6d;">Gitee仓库</a> | <a target="_blank" href="https://github.com/fengziye/Gblog" style="color: #ff6d6d;">Github仓库</a>记得star★哟</p>
                    </div>
                </div>
                <div class="about-me about-info">
                    <section-title id="Guestbook">友情申请👵🏼</section-title>
                    <div class="info-card">
                        <div class="contactForm">
                            <div class="form-item">
                                <label for="mail">名称</label>
                                <input v-model="name" class="v" type="text" name="mail" id="mail">
                            </div>
                            <div class="form-item">
                                <label for="mail">链接</label>
                                <input v-model="url" class="v" type="text" name="mail" id="mail">
                            </div>
                            <div class="form-item">
                                <label for="mail">邮箱</label>
                                <input v-model="email" class="v" type="email" name="mail" id="mail">
                            </div>
                            <div class="form-item">
                                <label for="content">描述</label>
                                <textarea v-model="message" class="v" id="content" name="content"></textarea>
                            </div>
                            <div class="form-item">
                                <label></label>
                                <button @click="commit">提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import sectionTitle from '@/components/section-title'
    import {getTime,getTimeInterval} from '@/utils'
    // import Quote from "@/components/quote";
    // import {fetchFriend} from '../api'
    export default {
        name: "About",
        data() {
            return {
                list: [],
                name:"",
                url:"",
                message:"",
                email:""
            }
        },
        components: {
            // Quote,
            sectionTitle
        },
        methods: {
            commit(){
                var dataRest = {
                    "sityName":this.name,
                    "sityUri":this.url,
                    "sityEmail":this.email,
                    "sityMesasge":this.message
                }
                    console.log("sb")
                    console.log(dataRest)
                this.$http.post("/commitSity",this.qs.stringify(dataRest)).then((va)=>{
                   if(va.data.object){
                       alert("申请成功，如通过会通过邮件通知您")
                   }else{
                       alert("申请成功,服务器延迟稍后再试")
                   }
               })
            }
        },
        mounted() {
        }
    }
</script>
<style scoped lang="less">
    .about {
        padding-top: 40px;
    }

    .content-warp {
        margin-top: 80px;

        .about-info {
            margin: 30px 0;

            span {
                color: red;
                margin-right: 10px;
            }

            .info-card {
                min-height: 100px;
                padding: 20px;
                border-radius: 3px;
                margin: 30px 0 50px 0;
                box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
                p{
                    line-height: 1.7rem;
                }
            }
        }
        .contactForm{
            width: 100%;
            padding: 20px;
            .form-item{
                align-items: center;
                display: flex;
                &:not(:last-child){
                    margin-bottom: 20px;
                }
                label{
                  width: 80px;
                }
                .v{
                    min-height: 40px;
                    line-height: 20px;
                    border-radius: 3px;
                    padding: 2px 10px;
                    outline:none;
                    border: 1px solid #8fd0cc;
                    width: 100%;
                    resize: vertical;
                }
                button{
                    width: 100px;
                    height: 40px;
                    border-radius: 3px;
                    outline:0;
                    border-style: none;
                    cursor: pointer;
                    background-color: #409eff;
                    color: white;
                    &:hover{
                        opacity: 0.8;
                    }
                }
            }
        }
    }

    /*******/
    @media (max-width: 800px) {
        .content-warp {
            margin-top: 0;
        }
    }
</style>
